package com.share.shareplatform.sharegoods.service.impl;


import com.share.shareplatform.pojo.Type;
import com.share.shareplatform.sharegoods.dao.TypeDao;
import com.share.shareplatform.sharegoods.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {

    @Autowired
    private TypeDao typeDao;

    @Override
    public Long addOne(Type type) {
        return typeDao.addOne(type);
    }

    @Override
    public Integer updateOne(Type type) {
        return typeDao.updateOne(type);
    }

    @Override
    public Integer deleteOneById(Long id) {
        return typeDao.deleteOneById(id);
    }

    @Override
    public Integer deleteAllByIds(Long[] ids) {
        return typeDao.deleteAllByIds(ids);
    }

    @Override
    public Type findOneByName(String name) {
        return typeDao.findOneByName(name);
    }

    @Override
    public Type findOneById(Long id) {
        return typeDao.findOneById(id);
    }

    @Override
    public List<Type> findAll() {
        return typeDao.findAll();
    }
}
